import 'package:flutter_house_manager/constants/index.dart';
import 'package:flutter_house_manager/utils/DioRequest.dart';

Future<dynamic> getHouseListAPI() => dioRequest.get(HTTP_PATH.HOUSE_LIST);

Future<void> addHouseAPI(Map<String, dynamic> data) =>
    dioRequest.post(HTTP_PATH.HOUSE_LIST, data: data);

Future<dynamic> getHouseDetailAPI(String id) =>
    dioRequest.get(HTTP_PATH.HOUSE_LIST + '/' + id);
// restFul接口规范

// 同一个地址 不同的请求类型完成CRUD

Future<void> delHouseAPI(String id) =>
    dioRequest.delete(HTTP_PATH.HOUSE_LIST + '/' + id);
